<script setup>
import axios from 'axios'
import { onMounted, ref } from 'vue'

onMounted(async () => {
  const res = await axios.get('/SPE10_wstu.out')
  let times = res.data.replace('\\r', '').split('Time')
  console.log(times[0])
  // const XCOORD0 = data[0]
  // const YCOORD0 = data[1]

  // console.log(XCOORD0, YCOORD0)

  console.log(times.slice(1, times.length))

  for (let time of times.slice(1, times.length)) {
    let wells = time.split('WELL')
    console.log('time:', wells[0])
    // console.log(wells.slice(1, wells.length))

    for (let well of wells.slice(1, wells.length)) {
      const pros = well.split('\n')
      console.log('wellname', pros[0])
      console.log(
        pros.slice(1, pros.length).filter((item) => {
          return !(item == '\r' || item == '')
        }),
      )
    }
  }
})
</script>

<template>
  <div class="max-w-5xl mx-auto py-4">
    <div class="flex flex-col items-center justify-center">
      <div class="text-2xl py-6">赛项名称：亿级以上网格油藏模型三维可视化</div>
      <div class="text-xl">队伍：南屏晚钟</div>
    </div>
  </div>
</template>
